package cn.spike.rockcc.feign;

import cn.spike.rockcc.fallback.MediaFeignFallbackFactory;
import cn.spike.rockcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author:spike
 * @create:2023-03-19 15:55
 */
@FeignClient(value = "service-media",path = "/mediaFile",fallbackFactory = MediaFeignFallbackFactory.class)
public interface MediaFeignClient {

    @GetMapping("/getMediaByCourseId/{id}")
    JSONResult getMediaByCourseId(@PathVariable("id") Long id);

    @GetMapping("/getMediaById/{id}")
    JSONResult getMediaById(@PathVariable("id")Long id);

}
